﻿using ASmile.Com;
using ASmile.Com.Log;
using ASmile.DBModel;
using ASmile.Tools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ASmile.Win.DaBLL
{
    class LogBLL : BLLBase, ILogBLL
    {
        protected override string ControllerName => "SysManage/Log";

        /// <summary>
        /// 获取日志数据，FormName 区分日志表
        /// </summary>        
        public ApiResult<MiniTable> GetLogTable(ArgLogBase arg)
        {
            arg.AdSearchList = AdSearchList;
            return GetResult<MiniTable>(arg);
        }

        /// <summary>
        /// 获取应用日志
        /// </summary>
        public ApiResult<Log_App> GetAppDetail(int id)
        {
            return GetResult<Log_App>(new { id });
        }
        /// <summary>
        /// 获取http请求日志
        /// </summary>
        public ApiResult<Log_Http> GetHttpDetail(int id)
        {
            return GetResult<Log_Http>(new { id });
        }
        /// <summary>
        /// 获取sql日志
        /// </summary>
        public ApiResult<Log_Sql> GetSqlDetail(int id)
        {
            return GetResult<Log_Sql>(new { id });
        }
    }
}
